package com.scalar.forecast.projectSetup.actionCommands;

import com.scalar.forecast.actionCommands.ActionCommand;
import com.scalar.forecast.commons.Constants;


/**
 * Returns the Action Command Instance based on the action value passed
 *
 * Created by Veeru. 
 * Date: Feb 9, 2005
 * Time: 8:31:26 PM 
 */

public class UserDefinedFieldsActionCommandFactory implements Constants {

    public static ActionCommand getActionCommand( String action ) {

        if ( ACTION_MODIFY.equalsIgnoreCase( action ) ) {
            return new UserDefinedFieldsModifyCommand();
        }
        if ( ACTION_SAVE.equalsIgnoreCase( action ) ) {
            return new UserDefinedFieldsSaveCommand();
        }
        if ( ACTION_MODIFY_LIST.equalsIgnoreCase( action ) ) {
            return new UserDefinedListValuesModifyCommand();
        }
        if ( ACTION_SAVE_LIST.equalsIgnoreCase( action ) ) {
            return new UserDefinedListValuesSaveCommand();
        }
        return null;
    }
}
